#include <iostream>
#include "MyArray.h"

using namespace std;

int main(int argc, char const *argv[]){
        MyArray a1(10);

        for (int i = 0; i < a1.length(); i++)
        {
                a1.setData(i, i);
        }

        cout<<"打印a1"<<endl;
        for (int i = 0; i < a1.length(); i++)
        {
                cout<<a1.getData(i)<<" ";
        }

        MyArray a2 = a1;
        cout<<"打印a2"<<endl;
        for (int  i = 0; i < a2.length(); i++)
        {
                cout<<a2.getData(i)<<" ";
        }

        return 0;
}
